home *** CD-ROM | disk | FTP | other *** search
- /* These are various items which are common to the viewing program
- (jvmain.c) and the video setup program (jvsetup.c).
-
-
- */
-
- extern unsigned char cirrus, everex, paradise, tseng, trident;
- extern unsigned char t8900, ativga, aheada, aheadb;
- extern unsigned char oaktech, video7, chipstech, tseng4, genoa;
- extern unsigned char ncr, compaq, vesa, hi_color; /* signals existance of hi color card */
- extern unsigned char vga512, vga1024;
- extern int maxx, maxy;
-
- #define number_VGA_cards 18 /* the number of VGA cards supported */
- #define number_modes_supported 6 /* the max number of video modes for each card */
- #define number_modes_in_list 10 /* the max number of modes in the user selected list */
-
-
- /* definations for reading keyboard */
-
- #define arrow_left 0x4b
- #define arrow_right 0x4d
- #define arrow_up 0x48
- #define arrow_down 0x50
- #define page_up 0x49
- #define page_down 0x51
- #define escape 27
- #define home 71
- #define end 79
- #define RTN 13
- #define insert 82
- #define delete 83
- #define plus 43
- #define minus 45
-
-
- struct mode {
- int x_size;
- int y_size;
- unsigned char mode_number;};
-
-
- /* for this struct. All items should be in ascending order with 0x00 for the unused mode #'s */
- struct video_card {
- char name[20];
- struct mode vid_mode[number_modes_supported];
- } video_cards[number_VGA_cards] =
- { {"ahead", {{320, 200, 0x13}, {640, 400, 0x60}, {640, 480, 0x61}, {800, 600, 0x62}, {0000, 000, 0x00}, {0, 0, 0x0}}},
- {"ati", {{320, 200, 0x13}, {640, 400, 0x61}, {640, 480, 0x62}, {800, 600, 0x63}, {1024, 768, 0x64}, {0, 0, 0x0}}},
- {"chips & tech", {{320, 200, 0x13}, {640, 400, 0x78}, {640, 480, 0x79}, {800, 600, 0x7b}, {0, 0, 0x0}, {0, 0, 0x0}}},
- {"everex", {{320, 200, 0x13}, {640, 400, 0x14}, {512, 480, 0x15}, {640, 480, 0x30}, {800, 600, 0x31}, {0, 0, 0x0}}},
- {"oak-tek", {{320, 200, 0x13}, {640, 480, 0x53}, {800, 600, 0x54}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}}},
- {"genoa", {{320, 200, 0x13}, {640, 400, 0x7e}, {640, 480, 0x5c}, {720, 512, 0x5d}, {800, 600, 0x5e}, {0, 0, 0x0}}},
- {"NCR", {{320, 200, 0x13}, {640, 400, 0x5e}, {640, 480, 0x5f}, {800, 600, 0x5c}, {0, 0, 0x0}, {0, 0, 0x0}}},
- {"paradise", {{320, 200, 0x13}, {640, 400, 0x5e}, {640, 480, 0x5f}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}}},
- {"trident", {{320, 200, 0x13}, {640, 400, 0x5c}, {640, 480, 0x5d}, {800, 600, 0x5e}, {0, 0, 0x00}, {0, 0, 0x0}}},
- {"trident 8900", {{320, 200, 0x13}, {640, 400, 0x5c}, {640, 480, 0x5d}, {800, 600, 0x5e}, {1024, 768, 0x62}, {0, 0, 0x0}}},
- {"tseng", {{320, 200, 0x13}, {640, 350, 0x2d}, {640, 480, 0x2e}, {800, 600, 0x30}, {1024, 768, 0x38}, {0, 0, 0x0}}},
- {"tseng 4000", {{320, 200, 0x13}, {640, 350, 0x2d}, {640, 400, 0x2f}, {640, 480, 0x2e}, {800, 600, 0x30}, {1024, 768, 0x38}}},
- {"video 7", {{320, 200, 0x13}, {640, 400, 0x66}, {640, 480, 0x67}, {800, 600, 0x69}, {1024, 768, 0x6a}, {0, 0, 0x0}}},
- {"cirrus", {{320, 200, 0x13}, {640, 480, 0x2e}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}, { 0, 0, 0x0}}},
- {"compaq", {{320, 200, 0x13}, {640, 480, 0x2e}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}, { 0, 0, 0x0}}},
- {"vesa", {{320, 200, 0x13}, {640, 400, 0x100}, {640, 480, 0x101}, {800, 600, 0x103}, {1024, 768, 0x106}, {1280, 1024, 0x107}}},
- {"ATI, hi color", {{1280, 480, 0x72}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}}},
- {"Tseng, hi color", {{320, 200, 0x13}, {640, 350, 0x2d}, {640, 400, 0x2f}, {640, 480, 0x2e}, {800, 600, 0x30}, {0, 0, 0x0}}}
- };
-
- /* now the list of working modes as selected by the user - 10 maximum */
- /* one extra item at end (always 0) to simplify deletion */
- struct {
- int card_ID;
- int which_mode;
- } ok_mode[number_modes_in_list+1];
-
-
- /* these are for the graphics interface */
-
- unsigned char palbuf[256][3];
- int svga;
- unsigned int color;
- int video_mode_used; /* mode number index for card */
- int card_used; /* the current selected mode for viewing */
- int card_id; /* card id # - as found by autodetection (valid if svga = 1) */
- int enable_pan; /* enough memory for panning && needed?? */
- int shrink; /* 1 = normal, 2 = 1/2, 3 = 1/3 ... */
-
-
-